/*******************************************************************************
 * Copyright (C) 2010 Chris Wroe   
 * 
 *  Modifications to the initial code base are copyright of their
 *  respective authors, or their employers as appropriate.
 * 
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public License
 *  as published by the Free Software Foundation; either version 2.1 of
 *  the License, or (at your option) any later version.
 *    
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *    
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 ******************************************************************************/

package uk.co.wroedevelopments.semanticworkbench.reasoner;

import org.neo4j.api.core.Traverser;

import uk.co.wroedevelopments.semanticworkbench.store.AxiomType;
import uk.co.wroedevelopments.semanticworkbench.store.IKnowledgeBase;

/**
 * @author Chris Wroe
 * if A [ B and B [ C then A [ C
 * 
 * skip this transitive closure for now 
 * the question is whether this closure is needed or can be computed on the fly for other closures
 */
public class CompletionRule1 extends CompletionRule {
	public CompletionRule1(IKnowledgeBase kb) {
		super(kb);
		// TODO Auto-generated constructor stub
	}

	/** where to start?
	keep iterating through all A [ B concept inclusion axioms until no new inclusion axioms are added
		keep an in memory map of at which iteration step this axiom has been considered so as not to consider it again in the next step
		get all the concept inclusion axioms to be considered at this step
		 	find an axiom chain A [ B [ C and add new axiom A [ C
		 	for the database version this is done using a join on the temporary table
		 		A:x [ B:y in the temp table join A:y [ B:z in the main table 
		 		
	faster as a tree walk from top down don't bother go straight to completion rule 2
	
*/
	// iterate through all inclusion axioms
	public void run() {
		Traverser traverser = knowledgeBase.getAllAxiomOfType(AxiomType.CONCEPT_INCLUSION);
		
		
	}
	
	
	
	
}
